<?php
!defined('ROOT_DIR') && exit('Access Denied');

class Control extends Base {

	function __construct() {
		$_SESSION['lang'] = 'en';
		$this->init();
		$this->load('defalut');
		$this->load('cache');
	}

	function onIndex() {
		$id = get_vars('id', 1);
		
		$id = $_ENV['defalut']->test($id);
		
		require_once ROOT_DIR.'library'.DIRECTORY_SEPARATOR.'Pagination.php';
		$base_url = 'index.php';
		$num_items = 215;
		$per_page = 10;
		$cur_page = get_vars('page',1);
		$start_item = get_vars('start',1);
		$style_page = Pagination::stylePage($base_url, $num_items, $per_page, $cur_page);
		$style_start = Pagination::styleStart($base_url, $num_items, $per_page, $start_item);
		echo $style_page['page_string']."<br>";
		echo $style_start['page_string'];
		//var_dump($style_page);
		//var_dump($style_start);
		
		$arr = $_ENV['cache']->arrList();
		$member_list = $_ENV['cache']->memberList();
		var_dump($member_list);
		$this->view->assign('title','测试标题');
		$this->view->display('test');
	}

	function onDbcache() {
		  $_ENV['cache']->dbcache();
	}

}

?>